<template>
  <div class="home-banner">
    <XtxSlider :sliders="bannerList"/>
  </div>
</template>

<script>
// import { findBanner } from '@/api/home'
// import { ref } from 'vue'
import { useBanner } from '../serve'
export default {
  setup () {
    // const bannerList = ref([])
    // findBanner().then(res => {
    //   console.log('bannerList', res)
    //   bannerList.value = res.result
    // })
    const bannerList = useBanner()
    return { bannerList }
  }
}
</script>

<style lang="less">
.home-banner {
  width: 1240px;
  height: 500px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 98;
}
</style>
